﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowsRemoteScripting
{
    public class Blub
    {
        public void Test()
        {
            string serialNumber = "1234";
            List<Dictionary<string,object>> a = ActiveMachines("0", "0");
            Dictionary<string, object> machines = a.Find(delegate(Dictionary<string, object> machineEntries)
                { 
                    return machineEntries["SerialNumber"] == serialNumber; 
                });

            //var machines = from num in a where a.Find(delegate(Dictionary<string,object> test) { return new Dictionary<string,object>(); }) select num;
        }

        public static List<Dictionary<string, object>> ActiveMachines(string businessPartner_AccountNumber, string dataAreaId)
        {
            List<Dictionary<string, object>> aList = new List<Dictionary<string, object>>();
            Dictionary<string, object> machineRowEntry = new Dictionary<string, object>();
            machineRowEntry.Add("SerialNumber", "1234");
            aList.Add(machineRowEntry);
            return aList;
        }
    }
}
